home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20020314-20021006 / 000165_stephen@inisan…actrix.gen.nz.x_Fri Jun 21 14:09:55 EDT 2002.msg < prev    next >
Text File  |  2020-01-01  |  4KB  |  114 lines

  1. Article: 13469 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!iad-feed.news.verio.net!ord-feed.news.verio.net!stl-feed.news.verio.net!news.cc.ukans.edu!logbridge.uoregon.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!news-out.spamkiller.net!propagator2-maxim!propagator-maxim!news-in.spamkiller.net!news02.tsnz.net!news.actrix.gen.nz!inisant.jsw.gen.nz!127.0.0.1
  3. From: stephen@inisant.actrix.gen.nz.x (Stephen Worthington)
  4. Message-ID: <mGKLjqv1fPVx-pn2-dLJvrE4bbu5F@inisant.jsw.gen.nz>
  5. Newsgroups: comp.protocols.kermit.misc
  6. Subject: Script dropping out to command prompt
  7. User-Agent: ProNews/2 V1.51.ib110
  8. MIME-Version: 1.0
  9. Content-Type: text/plain; charset="us-ascii"
  10. Content-Transfer-Encoding: 8bit
  11. X-Original-NNTP-Posting-Host: 127.0.0.1
  12. X-Original-Trace: 22 Jun 2002 05:40:17 +1200, 127.0.0.1
  13. Lines: 91
  14. X-Original-NNTP-Posting-Host: 203.96.55.3
  15. Date: 22 Jun 2002 05:40:17 +1200
  16. NNTP-Posting-Host: 203.96.16.33
  17. X-Complaints-To: abuse@tsnz.net
  18. X-Trace: news02.tsnz.net 1024681220 203.96.16.33 (Sat, 22 Jun 2002 05:40:20 NZST)
  19. NNTP-Posting-Date: Sat, 22 Jun 2002 05:40:20 NZST
  20. Organization: TelstraClear
  21. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:13469
  22.  
  23. I am trying to write a script to automate changing some settings on my
  24.  
  25. Cisco 827 router via a telnet connection.  I am using Kermit 1.1.20 
  26. for 
  27. OS/2.  This is my first attempt a real Kermit script, so please let me
  28.  
  29. know if I am doing stupid things :-)
  30.  
  31. When I run the script, at a certain point I get dropped out of the 
  32. script 
  33. to a Kermit command prompt.  Doing an Alt-X from there causes the 
  34. script 
  35. to continue to completion.  What I do not understand is what causes 
  36. Kermit 
  37. to go to a command prompt.  I can see nothing different at that point 
  38. in 
  39. the script, or in the interaction with the router.  
  40.  
  41. This is the script at present:  
  42.  
  43. ======================================================================
  44. ==
  45. take {E:\U\K2\SCRIPTS\router_1.ksc}
  46. if fail end 1 {router login failed}
  47. lineout conf t
  48. input 20 {router(config)#}
  49. if fail end 1 {conf t failed (1)}
  50. set input timeout-action proceed
  51. lineout no ip inspect name DIALER-CBAC smtp
  52. input 50 {router(config)#}
  53. if fail end 1 {conf t failed (2)}
  54. clear input
  55. lineout exit
  56. set input timeout-action proceed
  57. set exit on-disconnect off
  58. input 60 {router#}
  59. xif fail {
  60.     echo failed
  61.     echo "\v(input)"
  62.     end 1
  63. }
  64. echo succeeded
  65. lineout exit
  66. end 0
  67. ======================================================================
  68. ==
  69.  
  70. The router_1.ksc script called at the start is a slight variation on 
  71. the 
  72. standard login.ksc script that logs in to the router.  It works 
  73. without 
  74. problems.  This is what I see when I run the script: 
  75.  
  76. ======================================================================
  77. ==
  78. User Access Verification
  79.  
  80. Password:
  81. router>enable
  82. Password:
  83. router#conf t
  84. Enter configuration commands, one per line.  End with CNTL/Z.
  85. router(config)#no ip inspect name DIALER-CBAC smtp
  86. %entry not found
  87.  
  88. router(config)#exit
  89. router#succeeded
  90. Kermit 95 1.1.20, 31 Mar 2000, for 32-bit OS/2
  91.  Copyright (C) 1985, 2000,
  92.   Trustees of Columbia University in the City of New York.
  93. Registered to:
  94.  
  95.   J S Worthington
  96.  
  97.   Serial number: K95-00007210131-1.1
  98.  
  99. Type ? or HELP for help.
  100. [E:\U\K2\] K-95>
  101. ======================================================================
  102. ==
  103.  
  104. The final "lineout exit" line is not executed until I do Alt-X, but 
  105. the 
  106. previous "echo succeeded" line works as "succeeded" is seen in the 
  107. output 
  108. just before the command line appears.
  109.  
  110. So what have I missed here?
  111.  
  112. -- 
  113. Anti-spam: Remove the .x to reply
  114.